﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using LoungeRepo.Core;
using NUnit.Framework;

namespace Test.LoungeRepo.Core
{
    partial class testLoungeRepository
    {
        private void CheckRootFolderCreation(string rootFolderPath)
        {
            string folderParam = rootFolderPath;
            if (string.IsNullOrEmpty(rootFolderPath))
                folderParam = LoungeRepository.DEFAULT_LOUNGE_REPOSITORY_ROOT_FOLDER_NAME;

            try { Directory.Delete(folderParam, true); } catch { }

            if (string.IsNullOrEmpty(rootFolderPath))
                new LoungeRepository();
            else
                new LoungeRepository(rootFolderPath);

            Assert.IsTrue(Directory.Exists(folderParam));
        }
    }
}
